<?php
    import('admin.Action.AdministratorAction');
class AdminAction extends AdministratorAction {
	public function _initialize(){
        	parent::_initialize();
    }
	public function index() {
		$this->assign('_header_tab_on_index',1);
		$index = empty($_GET['index'])?'All':$_GET['index'];
		$this->assign('index_active',$index);
		$this->display();
    }
	public function setup() {
		$enterprise_opt = model('Xdata')->lget('enterprise');
		$this->assign($enterprise_opt);
		$this->display();
    }
	public function savesetup() {
		if( $_POST['__hash__'] ) unset( $_POST['__hash__'] );
		$res = model('Xdata')->lput('enterprise',$_POST);
		if ($res) {
			$this->assign('jumpUrl', U('enterprise/Admin/setup'));
			$this->success('保存成功');
		}else {
			$this->error('保存失败');
		}
    }

}
